Stored and transmitted electronic data is often encrypted for data security purposes. There are a multitude of different encryption methods, usually involving transforming data files or data streams using an encryption algorithm. The encrypted data can be decrypted only by the appropriate decryption key and/or algorithm, generally available only to authorized users. Encryption methods may have the ability to recognize data that the encryption method itself has already encrypted. This avoids the inefficiencies inherent in double-encrypting such data, and at the same time avoids mistakenly attempting to decrypt either unencrypted data or data encrypted using a different protocol, which can result in unrecoverable, nonsense data. Encryption methods usually recognize encrypted data files or data streams they have themselves encrypted through a simple tag (such as a file extension) or code embedded within the data.
While many encryption methods are capable of detecting data the method itself has encrypted, it is useful to be able to detect encrypted data encrypted by any method, i.e., detecting encryption generally.